package com.halflife.framework.participant.range;

import org.springframework.stereotype.Repository;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Repository
public interface RoleMembershipRepository {

    int deleteByPrimaryKey(Integer id);

    int insert(RoleMembership roleMembership);

    int insertSelective(RoleMembership roleMembership);

    RoleMembership selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(RoleMembership roleMembership);

    int updateByPrimaryKey(RoleMembership roleMembership);

    List<RoleMembership> selectAll(Map<String, Object> param);

    int selectCount(Map<String, Object> param);

    List<RoleMembership> selectListByPage(Map<String, Object> param);

    @Select({"${sql}"})
    @ResultMap("BaseResultMap")
    List<RoleMembership> selectMany(@Param("sql") String sql);

    @Select({"${sql}"})
    @ResultMap("BaseResultMap")
    RoleMembership selectOne(@Param("sql") String sql);



}